package cc.rengu.igas.bsps.common.enums;

import cc.rengu.oltp.utility.util.StringUtil;

/**
 * @author zhangxuran
 * @version 1.0
 * @date 2020.06.28
 */
public enum NoCheckTxnInfoEnum {
    T00BS001("T00BS001", "商户入驻申请"),
    T00BS002("T00BS002", "获取用户授权码"),
    T00BS003("T00BS003", "获取用户授权信息"),
    T00BS004("T00BS004", "用户绑定关系查询"),
    T00BS005("T00BS005", "手机号获取用户列表"),
    T00BS006("T00BS006", "用户登录登出"),
    T00BS007("T00BS007", "商户绑定认证"),
    T00BS008("T00BS008", "商户绑定注册"),
    T00BS009("T00BS009", "注册用户名校验"),
    T00BS010("T00BS010", "用户密码重置"),
    T00BS011("T00BS011", "营销轮播广告查询"),
    T00BS017("T00BS017", "门店查询"),
    T00BS018("T00BS018", "收银员列表查询"),
    T00BS022("T00BS022", "账户发卡机构查询"),
    T00BS032("T00BS032", "公告信息查询"),
    T00BS050("T00BS050", "拓展经理认证登录"),
    T00BS064("T00BS064", "手机银行认证登录"),
    T00BS065("T00BS065", "手机银行微信授权绑定商户"),
    T00BS066("T00BS066", "手机银行商户号绑定"),
    T00BS067("T00BS067", "生成登录订单"),
    T00BS068("T00BS068", "登录订单状态查询"),
    T00BS069("T00BS069", "微信扫码登录"),
    T00BS077("T00BS077", "获取通讯公钥"),
    T00BS078("T00BS078", "同步AES密钥"),
    T00BS079("T00BS079", "申请图片验证码"),
    T00BS080("T00BS080", "申请短信验证码"),
    T00BS082("T00BS082", "附近网点查询"),
    T00BS083("T00BS083", "微信签名获取"),
    T00BS084("T00BS084", "二维码绑定商户查询"),
    T00BS085("T00BS085", "营销活动列表查询"),
    T00BS086("T00BS086", "卡券类活动列表查询"),
    T00BS087("T00BS087", "收银员返现类活动列表查询"),
    T00BS088("T00BS088", "商户营销活动管理"),
    T00BS089("T00BS089", "商户营销活动发布"),
    T00BS090("T00BS090", "商户查询营销活动详情"),
    T00BS091("T00BS091", "商户参与联和营销活动"),
    T00BS093("T00BS093", "收银员参与收银员返现活动"),
    T00BS094("T00BS094", "收银员返现明细查询"),
    T00BS095("T00BS095", "减免类活动详情查询"),
    T00BS096("T00BS096", "卡券类活动详情查询"),
    T00BS097("T00BS097", "收银员返现类活动详情查询"),
    T00BS098("T00BS098", "卡券信息查询"),
    T00BS099("T00BS099", "商户对客类营销活动统计报表"),
    T00BS101("T00BS101", "生成随机字符串"),
    T00BS100("T00BS100", "手机型号查询模板"),
    ;
    /**
     * 商户类型
     */
    private String txnNum;

    /**
     * 商户描述
     */
    private String txnDesc;

    NoCheckTxnInfoEnum(String txnNum, String txnDesc) {
        this.txnNum = txnNum;
        this.txnDesc = txnDesc;
    }

    public String getTxnNum() {
        return txnNum;
    }

    public String getTxnDesc() {
        return txnDesc;
    }


    /**
     * @param txnNum 交易码
     */
    public static boolean checkTxnNo(String txnNum) {
        if (StringUtil.isEmptyOrNull(txnNum)) {
            return false;
        }
        for (NoCheckTxnInfoEnum noCheckTxnInfoEnum : NoCheckTxnInfoEnum.values()) {
            if (txnNum.equals(noCheckTxnInfoEnum.getTxnNum())) {
                return true;
            }
        }
        return false;
    }

}
